package com.观察者模式;

/**
 * 客户端测试
 * @author Fang Ruichuan
 * @date 2022-09-09 14:10
 */
public class Client {
    public static void main(String[] args) {
        Investor investor1, investor2;
        investor1 = new ConcreteInvestor("Jack");
        investor2 = new ConcreteInvestor("Rose");

        Stock bilibili = new Stock("Anything", 99.0);
        bilibili.attach(investor1);
        bilibili.attach(investor2);
        bilibili.setPrice(199.0);
    }
}
